package com.zy.project1;

import com.zy.project1.biz.BankBiz;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

import java.sql.SQLException;

public class App_main {
    public static void main(String[] args) throws SQLException {
        ApplicationContext ac=new AnnotationConfigApplicationContext(AppConfig.class);


        //面向接口开发
        // 所以获取的是BankBizImpl对象,它是BankBiz接口的实现类
        BankBiz bb= (BankBiz) ac.getBean("bankBizImpl");
        //bb.showAll().forEach(  System.out::println );
       // List<BankAccount> list=bb.showAll();
//        for(   BankAccount ba:  list ){
//            System.out.println(ba);
//        }

        bb.addBankAccount(  333);
    }
}


// #Proxy26@4451   代理对象   面向接口的jdk动态代理
